<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" 
	xmlns:tiles="http://tiles.apache.org/tags-tiles" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" 
	lang="en">
  <head>
    
    <title tiles:string="title" ></title>
    <meta name="keywords" content="keyword1,keyword2,keyword3"/>
	<meta name="description" content="this is my page"/>
	<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />  
	    
  </head>
  
  <body>
    <table>
    	<tr>
    		<td tiles:include="p1">
    		</td>
    	</tr>
    	<tr>
    		<td tiles:include="p2">
    		</td>
    	</tr>
    </table>
    
    = = items = =
    <div th:each="item : ${items}">
    	
    </div>
    
    <tilesx:useAttribute name="items" id="itemsList" classname="java.util.List"/>
    <c:forEach items="${itemsList }" var="item">
    	<tiles:insertAttribute value="${item}" flush="true" />
    	<br/>
    </c:forEach>
    
    = = insert templates = =
    <br/>
    <tiles:insertTemplate template="/WEB-INF/jsp/tiles/layout.jsp">
    	<tiles:putAttribute name="title" value="" />
		<tiles:putAttribute name="header" value="/WEB-INF/jsp/tiles/header.jsp" />
		<tiles:putAttribute name="menu" value="/WEB-INF/jsp/tiles/menu.jsp" />
		<tiles:putAttribute name="body" value="" />
		<tiles:putAttribute name="footer" value="/WEB-INF/jsp/tiles/footer.jsp" />
    </tiles:insertTemplate>
    
    = =Inserting modified definitions = = <br/>
    <div th:unless="${myListAttribute}">Null</div>
    
    <div th:each="att : ${myListAttribute}">
    	<span th:text="${att}"></span>
    </div>
    
    <tiles:insertDefinition name="contact">
    	<tiles:putAttribute name="body" value="/WEB-INF/jsp/apache/page2.jsp"/>
    </tiles:insertDefinition>
    
    = = Link = = <br/>
    <tiles:useAttribute name="myListAttribute" id="myListAttr"/>
    <c:forEach var="item" items="${myListAttr}">
    	value: ${item.value } , link : ${item.link }
    	<br/>
    </c:forEach>
    
  </body>
</html>
